package com.heiye.relation.biz.constant;

/**
 * @author: heiye
 * @date: 2025/04/15 下午5:09
 * @version: v1.0.0
 * @description: TODO
 */
public class RedisKeyConstants {

    /**
     * Roaring Bitmap：问题关注 KEY 前缀
     */
    private static final String  R_BITMAP_QUIZ_FOLLOWING_KEY_PREFIX = "rbitmap:quiz:following:";

    /**
     * 粉丝列表 KEY 前缀
     */
    private static final String QUIZ_FANS_KEY_PREFIX = "quiz:fans:";

    /**
     * 构建问题关注 KEY
     *
     * @param userId
     * @return
     */
    public static String buildRBitmapQuizFollowingKey(Long userId) {
        return  R_BITMAP_QUIZ_FOLLOWING_KEY_PREFIX + userId;
    }

    /**
     * 构建粉丝列表完整的 KEY
     *
     * @param quizId
     * @return
     */
    public static String buildQuizFansKey(Long quizId) {
        return QUIZ_FANS_KEY_PREFIX + quizId;
    }
}
